import service from '@/utils/request'

// @Tags Visit
// @Summary 创建visit表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Visit true "创建visit表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /visit/createVisit [post]
export const createVisit = (data) => {
  return service({
    url: '/visit/createVisit',
    method: 'post',
    data
  })
}

// @Tags Visit
// @Summary 删除visit表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Visit true "删除visit表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /visit/deleteVisit [delete]
export const deleteVisit = (data) => {
  return service({
    url: '/visit/deleteVisit',
    method: 'delete',
    data
  })
}

// @Tags Visit
// @Summary 批量删除visit表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除visit表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /visit/deleteVisit [delete]
export const deleteVisitByIds = (data) => {
  return service({
    url: '/visit/deleteVisitByIds',
    method: 'delete',
    data
  })
}

// @Tags Visit
// @Summary 更新visit表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Visit true "更新visit表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /visit/updateVisit [put]
export const updateVisit = (data) => {
  return service({
    url: '/visit/updateVisit',
    method: 'put',
    data
  })
}

// @Tags Visit
// @Summary 用id查询visit表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Visit true "用id查询visit表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /visit/findVisit [get]
export const findVisit = (params) => {
  return service({
    url: '/visit/findVisit',
    method: 'get',
    params
  })
}

// @Tags Visit
// @Summary 分页获取visit表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取visit表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /visit/getVisitList [get]
export const getVisitList = (params) => {
  return service({
    url: '/visit/getVisitList',
    method: 'get',
    params
  })
}
